home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 106_01.zip / STDIO.LIB < prev    next >
Text File  |  1993-06-26  |  1KB  |  39 lines

  1. /*                stdio.lib
  2.  
  3.     Copyright (C) 1980, M J Maney
  4.  
  5.     First created    3/15/80
  6.     Last revised    3/15/80
  7.  
  8.     This library provides the defines and data declarations for the
  9.     stdio functions, which are an attempt to simulate some of the
  10.     things that a really nice OS (like UNIX) gives you in a less nice
  11.     enviornment (BDS C running under CP/M).
  12.  
  13.     To work properly, this file MUST be included into the source of
  14.     any program that wants to use the stdio functions, and the
  15.     library file csym.lib must also be included. These two files
  16.     MUST be the first two files included, and they MUST be included
  17.     in the sequence
  18.  
  19.     #include "csym.lib"
  20.     #include "stdio.lib"
  21.  
  22.     BEFORE any inline declarations of external (global) variables,
  23.     and that includes any such declarations in any other file which
  24.     is included! To be safe, just make the above two lines the first
  25.     non-comment lines of the source. NB that they must be included
  26.     in ALL source files for the program that declare globals!!
  27. */
  28.  
  29. /* define STDIN and STDOUT to work with getc & putc ONLY */
  30. #define STDIN (_stdin==FILE ? _inpbuf : 0)
  31. #define STDOUT (_stdout==FILE ? _outbuf : 1)
  32.  
  33. /* declare globals for stdio functions */
  34. char    _stdin,_stdout;
  35. char    _inpbuf[IOBUFSIZ],_outbuf[IOBUFSIZ];
  36. char    _inpname[FNAMSIZ],_outname[FNAMSIZ];
  37. int    _inpfd,_outfd;
  38. char    _filter;
  39.